﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_Masters/Default.Master" AutoEventWireup="true"
    CodeBehind="RoleManager.aspx.cs" Inherits="Hutech.CRM.Web.Admin.RoleManager" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
<span id="tabid" style="display: none">AdminMenu</span>

<asp:UpdatePanel ID="pnlMain" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="ImageButtonAddNew" EventName="Click" />
        <asp:AsyncPostBackTrigger ControlID="rolesList" EventName="ItemCommand" />
    </Triggers>
    <ContentTemplate>
        <asp:Panel ID="pnlWrapper" runat="server" CssClass="panelwrapper admin rolemanager">
            <div class="modulecontent">
                <div class="catology-metro">
                    <div class="left"><img class="ImageNomalHome-32" title="Home" src="../Resources/img/none-32.png" /></div>

                    <div class="left">
                        &nbsp;<asp:HyperLink ID="lnkAdminMenu" runat="server" NavigateUrl="~/Admin/AdminMenu.aspx" /> - 
                        <b><span id="spnTitle" runat="server"></span></b>
                    </div>
                    <%--<div class="right"><asp:ImageButton ID="ImageButtonBack" CssClass="ImageButtonBack-32 ImageButton" ImageUrl="~/Resources/img/none-32.png" runat="server" Text="Back" ToolTip="Quay lại" /></div>--%>
                </div>
                <div class="block-small">
                
                    <div class="bs-header">Thêm mới quyền người dùng</div>
                        <%--<i class="linehieght">Chú ý: Chức năng Xoá sẽ ảnh hưởng đến quyền hạn của User. Vui lòng cẩn trọng khi thêm mới hoặc xóa.</i>--%>
                    <div class="settingrow">
                        Tên gọi<br />
                        <asp:TextBox ID="txtNewRoleName" runat="server" MaxLength="50" CssClass="h-control-textbox" Width="270"></asp:TextBox>
                    </div>
                    <br />
                    <div class="bs-footer">
                        <div class="left">
                            <asp:ImageButton ID="ImageButtonAddNew" CssClass="ImageButtonNew-32 ImageButton" ImageUrl="~/Resources/img/none-32.png" runat="server" Text="New" ToolTip="Thêm mới" />
                        </div>
                        <div class="left"><asp:Label ID="lblMessageError" runat="server" CssClass="error"/></div>
                    </div>
                </div>
                <div class="block-auto">
                    <div class="settingrow-l">
                        <asp:DataList ID="rolesList" DataKeyField="RoleID" runat="server">
                            <ItemTemplate>
                                <asp:ImageButton ID="ImageButtonEdit" CssClass="ImageButtonEdit-16 ImageButton-16" ImageUrl="~/Resources/img/none-16.png" runat="server" CommandName="edit" BorderStyle="NotSet" ToolTip="Chỉnh sửa"/>
                                &nbsp;
                                <asp:ImageButton ID="ImageButtonDelete" CssClass="ImageButtonDelete-16 ImageButton-16" ImageUrl="~/Resources/img/none-16.png" runat="server" CommandName="delete" ToolTip="Xóa"/>
                                &nbsp;
                                <asp:HyperLink ID="HyperLinkPermission" runat="server" CssClass="ImageButton-16" ToolTip="Thiết lập nhóm quyền quản lý" ImageUrl="~/Data/SiteImages/admin.png" NavigateUrl='<%# SiteRoot + "/Admin/RoleAndPermission.aspx?roleid=" + DataBinder.Eval(Container.DataItem, "RoleID") %>' />
                                &nbsp;&nbsp;
                                <asp:Label Text='<%# DataBinder.Eval(Container.DataItem, "DisplayName") %>' runat="server"
                                    ID="Label1" />
                                <asp:HyperLink ID="lnkMembers" runat="server" Text='<%#  FormatMemberLink(Convert.ToInt32(Eval("MemberCount"))) %>'
                                    ToolTip='<%# Resources.Resource.RolesChangeMemberLabel%>' NavigateUrl='<%# SiteRoot + "/Admin/SecurityRoles.aspx?roleid=" + DataBinder.Eval(Container.DataItem, "RoleID") %>' />

                                <%--| 
                                <asp:HyperLink ID="lnkModule" runat="server" Text='<%# Resources.Resource.FeaturePermissionsLink %>'
                                    ToolTip='<%# Resources.Resource.FeatureSettingsTabFormat%>' NavigateUrl='#' />--%>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="roleName" Width="200" Text='<%# DataBinder.Eval(Container.DataItem, "DisplayName") %>' runat="server" />
                                &nbsp;
                                <mC:tsButton Text="<%# Resources.Resource.RolesApplyLabel %>" ToolTip="<%# Resources.Resource.RolesApplyLabel %>" CommandName="apply" runat="server" ID="Button1" />
                                &nbsp;
                                <mC:tsButton Text="<%# Resources.Resource.RoleManagerCancelButton %>" ToolTip="<%# Resources.Resource.RoleManagerCancelButton %>" CommandName="cancel" runat="server" ID="Button2" />
                            </EditItemTemplate>
                        </asp:DataList>
                    </div>
                    <div class="settingrow">
                        <asp:Label ID="lblError" runat="server" CssClass="txterror" />
                    </div>
                
                </div>
            </div>
        </asp:Panel>

        <div class="line"></div>

    </ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="contentLeft" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contentRight" runat="server">
</asp:Content>
